package org.frog.sgs.mina.server;

import org.apache.mina.core.service.IoHandler;
import org.apache.mina.core.session.IdleStatus;
import org.apache.mina.core.session.IoSession;

/**
 * @author duanxiangqi
 * @date 2012-10-18
 */
public class MyIoHandler implements IoHandler {

	public void exceptionCaught(IoSession session, Throwable cause) throws Exception {
		System.out.println("exceptionCaught()" + cause);
	}

	public void messageReceived(IoSession session, Object message) throws Exception {
		System.out.println("messageReceived() " + message);
	}

	public void messageSent(IoSession session, Object message) throws Exception {
		System.out.println("messageSent() " + message);
	}

	public void sessionClosed(IoSession session) throws Exception {
		System.out.println("sessionClosed()");
	}

	public void sessionCreated(IoSession session) throws Exception {
		System.out.println("sessionCreated()");
	}

	public void sessionIdle(IoSession session, IdleStatus status) throws Exception {
		System.out.println("sessionIdle()");
	}

	public void sessionOpened(IoSession session) throws Exception {
		System.out.println("sessionOpened()");
	}
}
